//============================================================================
// Name        : LinkedList.cpp
// Author      : 
// Version     :
// Copyright   : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================

#include <iostream>
#include "List.h"

using namespace std;

int main() {
	List* a = new List;
	List* b = new List;
	List result;
	/*for (int i = 0; i < 20; i++) {
	 a->addLast(i);
	 if (i >= 10)
	 b->addLast(i);
	 }*/
	/*a = List::buildLinkedList();
	 b = List::buildLinkedList();*/

	int aa[5] = { 1, 2, 3, 4, 5 };
	int bb[17] = { 1, 1, 1, 2, 2, 2, 6, 6, 7, 8, 4, 4, 4, 4, 4, 4, 4 };
	for (int i = 0; i < 17; i++) {
		if (i < 5)
			a->addLast(aa[i]);
		b->addLast(bb[i]);
	}

	cout << "a : ";
	a->display();
	cout << "b : ";
	b->display();
	cout << "Intersection : ";
	result.getIntersection(a, b);
	result.display();
	result.getUnion(a, b);
	cout << "Union : ";
	result.display();
	return 0;
}
